<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:body>

	<div align="center" class="DivModalPesq">
		<h:form id="formProd" PrependId="false">
			<div style="float: left;">
				<p:panel styleClass="DivAdic">
					<div align="left" class="DivProd">
						<h:outputText value="#{message.msg_codigo}" styleClass="LabelFont" />
						<br />
						<p:inputText value="#{solicitaTela.produtoPesq.codigo}"
							styleClass="LabelFont" style="font-size: 14px;" size="10">
							<p:ajax event="keyup" update="proTable"
								listener="#{solicitaTela.atuaProdutos}" global="false" />
						</p:inputText>
					</div>
					<div align="left" class="DivProd">
						<h:outputText value="#{message.msg_descri}" styleClass="LabelFont" />
						<br />
						<p:inputText value="#{solicitaTela.produtoPesq.descricao}"
							styleClass="LabelFont" style="font-size: 14px;">
							<p:ajax event="keyup" update="proTable"
								listener="#{solicitaTela.atuaProdutos}" global="false" />
						</p:inputText>
					</div>
					<div align="left" class="DivProd">
						<h:outputText value="#{message.msg_grupo}" styleClass="LabelFont" />
						<br />
						<p:inputText value="#{solicitaTela.produtoPesq.grupo}"
							styleClass="LabelFont" style="font-size: 14px;" size="4">
							<p:ajax event="keyup" update="proTable"
								listener="#{solicitaTela.atuaProdutos}" global="false" />
						</p:inputText>
					</div>
					<div align="left" class="DivProd">
						<h:outputText value="#{message.msg_grupo_desc}"
							styleClass="LabelFont" />
						<br />
						<p:inputText value="#{solicitaTela.produtoPesq.grupoDesc}"
							styleClass="LabelFont" style="font-size: 14px;">
							<p:ajax event="keyup" update="proTable"
								listener="#{solicitaTela.atuaProdutos}" global="false" />
						</p:inputText>
					</div>
				</p:panel>
			</div>
			<br />
			<p:dataTable id="proTable" var="prod"
				value="#{solicitaTela.prodModel}" widgetVar="prodTable"
				emptyMessage="#{message.msg_semvalores}" paginator="true" rows="10"
				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="10,15,30,50" styleClass="LabelFont"
				style="font-size: 14px;" selectionMode="single"
				selection="#{solicitaTela.prodSel}">
				<p:ajax event="rowSelect"
					update=":growl,:form:iProd,:form:iDesc,:form:iUm,:form:iNec,:form:iArm,:form:iFil,proTable"
					listener="#{solicitaTela.onProdSelect}" oncomplete="dlg4.hide()"
					process="@this,:form:iProd,:form:iDesc" global="false" />
					
				<p:column styleClass="LabelFont" sortBy="#{prod.codigo}" style="width:100px;">
					<f:facet name="header">
						<h:outputText value="#{message.msg_codigo}" />
					</f:facet>
					<h:outputText value="#{prod.codigo}" />
				</p:column>

				<p:column styleClass="LabelFont" sortBy="#{prod.descricao}" style="width:300px;">
					<f:facet name="header">
						<h:outputText value="#{message.msg_descri}" />
					</f:facet>
					<h:outputText value="#{prod.descricao}" />
				</p:column>

				<p:column styleClass="LabelFont" sortBy="#{prod.grupo}" style="width:75px;">
					<f:facet name="header">
						<h:outputText value="#{message.msg_grupo}" />
					</f:facet>
					<h:outputText value="#{prod.grupo}" />
				</p:column>

				<p:column styleClass="LabelFont" sortBy="#{prod.grupoDesc}">
					<f:facet name="header">
						<h:outputText value="#{message.msg_grupo_desc}" />
					</f:facet>
					<h:outputText value="#{prod.grupoDesc}" />
				</p:column>
				
			</p:dataTable>
		</h:form>
	</div>
</h:body>
</html>